﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Chapter01
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void button3_Click(object sender, RoutedEventArgs e)
        {
            Window2 window2 = new Window2();
            window2.ShowDialog();
        }

        private void button4_Click(object sender, RoutedEventArgs e)
        {
            System.Windows.Resources.StreamResourceInfo myInfo;
            myInfo = Application.GetResourceStream(new Uri(@".\textfiles\test1.txt", UriKind.Relative));
            System.IO.StreamReader myReader = new System.IO.StreamReader(myInfo.Stream);
            string myString = myReader.ReadToEnd();
        }

        private void button5_Click(object sender, RoutedEventArgs e)
        {
            Window3 window3 = new Window3();
            window3.ShowDialog();
        }
    }
}
